/*   1:    */ package com.atomikos.persistence.imp;
/*   2:    */ 
/*   3:    */ import com.atomikos.persistence.ObjectImage;
/*   4:    */ import com.atomikos.persistence.Recoverable;
/*   5:    */ import java.io.Externalizable;
/*   6:    */ import java.io.IOException;
/*   7:    */ import java.io.ObjectInput;
/*   8:    */ import java.io.ObjectOutput;
/*   9:    */ 
/*  10:    */ class SystemLogImage
/*  11:    */   implements Recoverable, Externalizable
/*  12:    */ {
/*  13:    */   static final long serialVersionUID = 4153546869295179306L;
/*  14: 50 */   protected Recoverable recoverable_ = null;
/*  15: 51 */   protected boolean forgettable_ = false;
/*  16:    */   private static final String END_OF_LOG_ENTRY = "END_OF_LOG_ENTRY";
/*  17:    */   
/*  18:    */   public SystemLogImage()
/*  19:    */   {
/*  20: 57 */     this.forgettable_ = true;
/*  21:    */   }
/*  22:    */   
/*  23:    */   public SystemLogImage(Recoverable recoverable, boolean forgettable)
/*  24:    */   {
/*  25: 62 */     this.recoverable_ = recoverable;
/*  26: 63 */     this.forgettable_ = forgettable;
/*  27:    */   }
/*  28:    */   
/*  29:    */   public Object getId()
/*  30:    */   {
/*  31: 69 */     if (this.recoverable_ == null) {
/*  32: 70 */       return "END_OF_LOG_ENTRY";
/*  33:    */     }
/*  34: 72 */     return this.recoverable_.getId();
/*  35:    */   }
/*  36:    */   
/*  37:    */   public boolean isForgettable()
/*  38:    */   {
/*  39: 82 */     return this.forgettable_;
/*  40:    */   }
/*  41:    */   
/*  42:    */   public ObjectImage getObjectImage()
/*  43:    */   {
/*  44: 94 */     return this.recoverable_.getObjectImage();
/*  45:    */   }
/*  46:    */   
/*  47:    */   public Recoverable getRecoverable()
/*  48:    */   {
/*  49: 99 */     return this.recoverable_;
/*  50:    */   }
/*  51:    */   
/*  52:    */   public void readExternal(ObjectInput in)
/*  53:    */     throws IOException, ClassNotFoundException
/*  54:    */   {
/*  55:105 */     ObjectImage objectimage = null;
/*  56:106 */     objectimage = (ObjectImage)in.readObject();
/*  57:107 */     this.recoverable_ = objectimage.restore();
/*  58:108 */     this.forgettable_ = in.readBoolean();
/*  59:    */   }
/*  60:    */   
/*  61:    */   public void writeExternal(ObjectOutput out)
/*  62:    */     throws IOException
/*  63:    */   {
/*  64:114 */     ObjectImage img = this.recoverable_.getObjectImage();
/*  65:115 */     out.writeObject(img);
/*  66:116 */     out.writeBoolean(this.forgettable_);
/*  67:    */   }
/*  68:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.persistence.imp.SystemLogImage
 * JD-Core Version:    0.7.0.1
 */